<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'questionnaireType.label', default: 'Component')}"/>
    <title>问卷类型列表</title>
</head>

<body>
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>贷款管理系统</li>
                    <li class="active">
                        <span>问卷类型列表</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                问卷类型
            </h2>
        </div>
    </div>
</div>

<div class="content animate-panel">

    <div class="row">
        <g:if test="${flash.message}">
            <div class="message alert alert-info" role="status">${flash.message}
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
                        aria-hidden="true">×</span></button>
            </div>
        </g:if>
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    <g:link class="btn btn-info btn-xs" controller="questionnaireType" action="create"><i
                            class="fa fa-plus"></i>新增</g:link>
                </div>
                问卷类型
            </div>

            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover">
                        <thead>
                        <tr>
                            <g:sortableColumn property="name"
                                              title="${message(code: 'questionnaireType.name.label', default: '名称')}"/>
                            <g:sortableColumn property="active"
                                              title="${message(code: 'questionnaireType.active.label', default: '是否启用')}"/>
                            <g:sortableColumn property="createdDate"
                                              title="${message(code: 'questionnaireType.createdDate.label', default: '创建时间')}"/>
                            <g:sortableColumn property="modifiedDate"
                                              title="${message(code: 'questionnaireType.modifiedDate.label', default: '修改时间')}"/>
                            <g:sortableColumn property="createBy"
                                              title="${message(code: 'questionnaireType.createBy.label', default: '创建人')}"/>
                            <g:sortableColumn property="modifyBy"
                                              title="${message(code: 'questionnaireType.modifyBy.label', default: '修改人')}"/>
                        </tr>
                        </thead>
                        <tbody>
                        <g:each in="${questionnaireTypeList}">
                            <tr>
                                <td><g:link controller="questionnaireType" action="show"
                                            id="${it?.id}">${it?.name}</g:link></td>
                                <td>
                                    ${it?.active}
                                </td>
                                <td>
                                    <g:formatDate format="yyyy-MM-dd HH:mm:ss" date="${it?.createdDate}"/>
                                </td>
                                <td>
                                    <g:formatDate format="yyyy-MM-dd HH:mm:ss" date="${it?.modifiedDate}"/>
                                </td>
                                <td>
                                    <span class="nameFormat">${it?.createBy}</span>
                                </td>
                                <td>
                                  <span class="nameFormat">${it?.modifyBy}</span>

                                </td>

                            </tr>
                        </g:each>
                        </tbody>
                    </table>
                </div>
            </div>

            <div class="panel-footer">
                <div class="pagination">
                    <g:paginate total="${questionnaireTypeCount ?: 0}" params="${params}"/>
                </div>
            </div>
        </div>
    </div>
</div>


<g:javascript>
    $(function () {
        $("#resetBtn").click(function () {
            $("#name").val("");
            $("#type").val("");
        })
    });

</g:javascript>
</body>
</html>
